<?php
// <copyright file="AuthenticationType.cs" company="NQtec">
// Copyright (c) 2008, 2009 All Right Reserved, http://www.dqer.com/
// Copyright (c) 2008, 2009 All Right Reserved, http://www.nqtec.com/
//
// This source is part of the DQER library that released under the LGPL.
// Please see the License.txt file for more information.
// All other rights reserved.
//
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// </copyright>
// <author>Victor Gatkov</author>
// <email>v.gatkov@nqtec.com</email>
// <email>info@dqer.com</email>
// <date>2008-09-11</date>
// <summary>Contains a base, abstract class for an AuthorisationPolicyProvider</summary>

class Sanity {

   var $ts;

   function Sanity() {
//      $this->startSession();
   }


   function uname($data) {
      if(!eregi("^[a-zA-Z0-9]{4,16}$",$data)) return false;
//      if(strtolower($data)=='admin') return false;
//      if(strtolower($data)=='fuck') return false;
      else return true;
   }
   function uname_reg_restricted($data) {
      if(strtolower($data)=='admin') return true;
      if(strtolower($data)=='fuck') return true;
      else return false;
   }
   function pword($data) {
      if(!eregi("^[a-zA-Z0-9]{4,16}$",$data)) return false;
      else return true;
   }
   function hash64($data) {
      if(!eregi("^[0-9a-f]{64}$",$data)) return false;
      else return true;
   }
// country ISO(L), city(c), street(c), house(c), pob(c), email(s), 

};
//$sanity = new Sanity;
?>
